package com.hqq.presentation_tier.flux.main;

import com.hqq.presentation_tier.flux.action.MenuItem;
import com.hqq.presentation_tier.flux.dispatcher.Dispatcher;
import com.hqq.presentation_tier.flux.store.ContentStore;
import com.hqq.presentation_tier.flux.store.MenuStore;
import com.hqq.presentation_tier.flux.view.ContentView;
import com.hqq.presentation_tier.flux.view.MenuView;

/**
 * App
 * Created by heqianqian on 2017/8/17.
 */
public class App {

    public static void main(String[] args) {
        MenuStore menuStore = new MenuStore();
        Dispatcher.getInstance().registerStore(menuStore);
        ContentStore contentStore = new ContentStore();
        Dispatcher.getInstance().registerStore(contentStore);
        MenuView menuView = new MenuView();
        menuStore.registerView(menuView);
        ContentView contentView = new ContentView();
        contentStore.registerView(contentView);

        menuView.render();
        contentView.render();

        menuView.itemClicked(MenuItem.COMPANY);
    }
}
